 cd "/Users/ryanmcdevitt/Dropbox/Check Cashers"
///////////////////////////////////////////////

use deposit_data.dta, clear
gen low_income_face = low_income*facevalue


///TABLE 1/////
sum cash_check fee facevalue distance_sb  real_hold real_hold_1 real_hold_2 real_hold_3 real_hold_4 real_hold_5 post
//for i
codebook id



//TABLE 2(a)
tab cash_check real_hold if post==0, col
//for i
codebook id if post==0

tab cash_check real_hold if post==1, col
//for i
codebook id if post==1



//TABLE 2(b)
tab cash_check real_hold if low_income==1, col
//for i
codebook id if low_income==1


tab cash_check real_hold if low_income==0, col
//for i
codebook id if low_income==0



//TABLE 2(c)
tab cash_check real_hold if facevalue>=150 & facevalue<=200 & act_dayofweek < 4, col
//for i
codebook id if facevalue>=150 & facevalue<=200 & act_dayofweek < 4


tab cash_check real_hold if facevalue>200 & facevalue<=250 & act_dayofweek < 4, col
//for i
codebook id if facevalue>200 & facevalue<=250 & act_dayofweek < 4


////TABLE 3(1)////
logit cash_check fee real_hold distance_sb ib2.act_dayofweek ib12.act_month facevalue  , vce(cluster id)



////TABLE 3(2)////
xtset id
xtlogit cash_check fee real_hold distance_sb ib2.act_dayofweek ib12.act_month facevalue  , fe 

////TABLE 3(3)////
logit cash_check fee real_hold distance_sb ib2.act_dayofweek ib12.act_month post facevalue, vce(cluster id)

////TABLE 3(4)////
logit cash_check fee real_hold distance_sb ib2.act_dayofweek ib12.act_month facevalue  if pre_cut_customer ==1  , vce(cluster id)

////TABLE 3(5)////
logit cash_check fee real_hold distance_sb ib2.act_dayofweek ib12.act_month low_income facevalue, vce(cluster id) 

////TABLE 3(6)////
logit cash_check fee real_hold distance_sb ib2.act_dayofweek ib12.act_month low_income low_income_hold low_income_fee low_income_face facevalue, vce(cluster id) 

////TABLE 3(7)////
logit cash_check fee real_hold distance_sb ib2.act_dayofweek ib12.act_month facevalue  if   facevalue >=150 & facevalue <=250 & act_dayofweek < 4, vce(cluster id)

////TABLE 3(8)////
logit cash_check fee real_hold distance_sb  ib12.act_month ib2.act_dayofweek facevalue  if act_dayofweek<5, vce(cluster id)


////TABLE 3(9)////
logit cash_check fee real_hold distance_sb ib12.act_month ib2.act_dayofweek facevalue  if  holiday_float==1, vce(cluster id)


